package com.spring.demo5.eg3;

import org.springframework.context.annotation.Conditional;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Conditional(EnvCondition.class)
public @interface EnvConditional {

    Env value() default Env.DEV;

    // 环境
    enum Env {
        TEST, DEV, PROD
    }
}
